home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1993 July / InfoMagic USENET CD-ROM July 1993.ISO / sources / unix / volume15 / twm / part04 < prev    next >
Encoding:
Internet Message Format  |  1988-06-12  |  15.4 KB

  1. Subject:  v15i067:  A window manager for X, Part04/04
  2. Newsgroups: comp.sources.unix
  3. Sender: sources
  4. Approved: rsalz@uunet.UU.NET
  5.  
  6. Submitted-by: Tom LaStrange <esunix!tlastran>
  7. Posting-number: Volume 15, Issue 67
  8. Archive-name: twm/part04
  9.  
  10. [  I shar'd the manpage.  -r$ ]
  11.  
  12. #! /bin/sh
  13. # This is a shell archive.  Remove anything before this line, then unpack
  14. # it by saving it into a file and typing "sh file".  To overwrite existing
  15. # files, type "sh file -c".  You can also feed this as standard input via
  16. # unshar, or by typing "sh <file", e.g..  If this archive is complete, you
  17. # will see the following message at the end:
  18. #        "End of shell archive."
  19. PATH=/bin:/usr/bin:/usr/ucb ; export PATH
  20. if test -f 'twm.man' -a "${1}" != "-c" ; then 
  21.   echo shar: Will not clobber existing file \"'twm.man'\"
  22. else
  23. echo shar: Extracting \"'twm.man'\" \(14305 characters\)
  24. sed "s/^X//" >'twm.man' <<'END_OF_FILE'
  25. X.de EX        \"Begin example
  26. X.ne 5
  27. X.if n .sp 1
  28. X.if t .sp .5
  29. X.nf
  30. X.in +.5i
  31. X..
  32. X.de EE
  33. X.fi
  34. X.in -.5i
  35. X.if n .sp 1
  36. X.if t .sp .5
  37. X..
  38. X.TH TWM 1 "6 April 1988" "X Version 11"
  39. X.SH NAME
  40. X.PP
  41. Xtwm - a window manager for X11 (Tom's Window Manager)
  42. X.PP
  43. X.SH SYNTAX
  44. X.PP
  45. X\fBtwm \fP[-display \fIdisplay\fP]
  46. X.PP
  47. X.SH DESCRIPTION
  48. X.PP
  49. XThe \fItwm\fP program is a window manager client 
  50. Xapplication of the window 
  51. Xserver.
  52. X.PP
  53. XThe \fItwm\fP program was written to try and incorporate some of the
  54. Xdesirable features of both the \fBwm\fP and \fBuwm\fP window managers.
  55. X\fITwm\fP puts a title bar on  and re-parents each window.
  56. XThe title bar contains the
  57. Xwindow's name and three "buttons".  When a pointer button press event
  58. Xis detected in any of these title bar "buttons" a certain action is
  59. Xperformed.  The left-most title bar button that looks like a window pane
  60. Xcauses the window to be iconified.  The right-most title bar button with
  61. Xthe right-angles is the re-size button.  The resize function is identical
  62. Xto the window resize function of the \fBwm\fP window manager.  The other
  63. Xtitle bar button is supposed to represent a keyboard,  a button click here
  64. Xcauses the input focus to be directed to this window until the \fBf.focus\fP
  65. Xfunction is executed or another window is selected to get input focus.
  66. XThe title bar has the additional feature of becoming highlighted if the
  67. Xwindow has the input focus.
  68. X.PP
  69. XWhen \fItwm\fP is invoked, it attempts to read a \fItwm\fP startup file.
  70. XThe name of the \fItwm\fP startup file is:
  71. X.sp
  72. X  $HOME/.twmrc\fP
  73. X.PP
  74. XThe \fItwm\fP startup file can be thought of as having three logical
  75. Xsections: the variables section, the buttons section, and the menus
  76. Xsection.  The variables section must come first, followed by either the
  77. Xbuttons section or the menus section.
  78. X.PP
  79. XAll variables and keywords may be
  80. Xentered in any combination of upper and lower case letters.  Title
  81. Xfunctions and Root functions must be entered in lower case. A 
  82. Xpound sign (#) character in the startup file indicates a comment 
  83. Xwhich is terminated by the newline character.  A \fIstring\fP in
  84. Xthe startup file is a series of characters enclosed by double quotes.
  85. X.PP
  86. X.SH VARIABLES SECTION
  87. X.PP
  88. XVariables must be entered first, at the top of the startup
  89. Xfile.  Variables are initialized once when \fItwm\fP begins
  90. Xexecution, they will not be effected when a \fBf.twmrc\fP
  91. Xfunction is executed.
  92. X.IP "\fBAutoRaise\fP { \fIlist\fP }" 20
  93. XThis variable is a list of window names that will automatically
  94. Xraise to the top of the stacking order whenever the pointer enters
  95. Xthe window.  The window names in the list are the first characters
  96. Xin the window name to check for.  For example:
  97. X.EX 0
  98. X\fBAutoRaise\fP
  99. X{
  100. X   "xterm"
  101. X   "xclock"
  102. X}
  103. X.EE
  104. XThe above list contains two names which will match window names beginning
  105. Xwith the string "xterm" or "xclock".  The following window names will match
  106. Xand be in auto-raise mode: "xterm", "xterm_iguana", "xclock".
  107. X.IP "\fBBorderWidth\fP \fIpixels\fP" 20 
  108. XThis variable specifies the width in pixels of of the border surrounding all
  109. Xwindows.  The default is 2.
  110. X.IP "\fBIconFont\fP \fIstring\fP" 20
  111. XThis variable names the font to be displayed within icons.  The default
  112. Xis "8x13".
  113. X.IP "\fBMenuFont\fP \fIstring\fP" 20
  114. XThis variable names the font to be displayed within menus.  The default
  115. Xis "8x13".
  116. X.IP "\fBNoTitle\fP { \fIlist\fP }" 20
  117. XThis variable is a list of window names that will NOT have a title
  118. Xbar created for them.  If the client does not get ButtonPress events,
  119. X\fItwm\fP will get them and all Title functions currently in effect
  120. Xwill work when pointer buttons are pressed in the client window.  The list
  121. Xof windows and how they match window names is exactly like the 
  122. X\fBAutoRaise\fP variable described above.
  123. X.IP "\fBResizeFont\fP \fIstring\fP" 20
  124. XThis variable names the font to be displayed in the dimensions window
  125. Xduring window resize operations.
  126. XThe default is "fg-22".
  127. X.IP "\fBTitleFont\fP \fIstring\fP" 20
  128. XThis variable names the font to be displayed within
  129. Xthe window title bar.  Note that the title bar is only 17 pixels in height,
  130. Xso the largest practical font would be something like "9x15". The default
  131. Xis "8x13".
  132. X.IP "\fBReverseVideo\fP" 20 
  133. XThis variable causes \fItwm\fP to display white characters
  134. Xon a black background,
  135. Xrather than black characters on white.
  136. X.IP "\fBUnknownIcon\fP \fIstring\fP" 20
  137. XThis variable specifies the file name of a bitmap format file to be
  138. Xused as the default icon.  This bitmap will be used for the icon of all
  139. Xclients which do not provide an icon bitmap.  The default is to use
  140. Xno bitmap.
  141. X.IP "\fBWarpCursor\fP" 20
  142. XThis variable causes the pointer cursor to be warped to a window which
  143. Xis being deiconified.  The default is to not warp the cursor.
  144. X.PP
  145. X.SH BUTTONS SECTION
  146. X.PP
  147. XThe buttons section of the startup file contains definitions of functions
  148. Xto perform when pointer buttons are pressed.  There are two classes of functions
  149. Xthat can be tied to a pointer button:  Title functions, which will be
  150. Xexecuted if a pointer button is pressed while the pointer is in
  151. Xthe title bar of a window; and Root functions, which will be executed 
  152. Xwhile the pointer is in the root window or if the client program is
  153. Xnot processing pointer button events.
  154. X.PP
  155. XTitle functions are assigned as follows:
  156. X.IP "\fBTitleButton\fP\fIn\fP \fIt.function\fP" 20
  157. X\fBTitleButton\fP is a startup file keyword.  The \fIn\fP following 
  158. X\fBTitleButton\fP can be a number between 1 and 5 to indicate which pointer 
  159. Xbutton the function is to be tied to. \fIt.function\fP may be any one of the
  160. Xfollowing title functions.
  161. X.PP
  162. X.SH Title Functions
  163. X.PP
  164. X.IP \fBt.lower\fP 20
  165. XThis function lowers the window to the bottom of the stacking order.
  166. X.IP \fBt.move\fP 20
  167. XThis function causes a grid to appear over the window which can be moved 
  168. Xto where you want the window to be moved.  Double clicking the pointer 
  169. Xbutton tied to this function causes a constrained move function to be
  170. Xexecuted.  The pointer will be warped to the center of the grid.
  171. XMoving the pointer to one of the grid lines will cause the window 
  172. Xto begin moving in either an up-down motion or a left-right motion
  173. Xdepending on which grid line the pointer was moved across.
  174. X.IP \fBt.nop\fP 20
  175. XThis function does nothing.
  176. X.IP \fBt.raise\fP 20
  177. XThis function raises the window to the top of the stacking order.
  178. X.PP
  179. XThe defaults for title functions are as follows:
  180. X.PP
  181. X.IP
  182. X\fBTitleButton1 t.raise\fP
  183. X.IP
  184. X\fBTitleButton2 t.move\fP
  185. X.IP
  186. X\fBTitleButton3 t.lower\fP
  187. X.IP
  188. X\fBTitleButton4 t.nop\fP
  189. X.IP
  190. X\fBTitleButton5 t.nop\fP
  191. X.PP
  192. XRoot functions are assigned either to a pointer button or a menu entry.
  193. XThe \fBf.title\fP function is the only one that doesn't really make
  194. Xsense to use as just a button function.  It was designed to be used in
  195. Xa pull-down menu.  Root functions are assigned to pointer buttons
  196. Xas follows:
  197. X.PP
  198. X.IP "\fBButton\fP\fIn\fP \fIfunction\fP" 20
  199. X\fBButton\fP is a startup file keyword.  The \fIn\fP following 
  200. X\fBButton\fP can be a number between 1 and 5 to indicate which pointer 
  201. Xbutton the function is to be tied to. \fIfunction\fP may be any one of the
  202. Xfollowing root functions.
  203. X.PP
  204. X.SH Root Functions
  205. X.PP
  206. X.IP "\fB!\fP \fIstring\fP" 20
  207. XThis function causes \fIstring\fP to be sent to /bin/sh for execution.
  208. X.IP "\fB^\fP \fIstring\fP" 20
  209. XThis function causes \fIstring\fP followed by a new line character
  210. Xto be placed in the window server's cut buffer.
  211. X.IP "\fBf.circledown\fP" 20
  212. XThis function causes the top window that is obscuring another window to
  213. Xdrop to the bottom of the stack of windows.
  214. X.IP "\fBf.circleup\fP" 20
  215. XThis function raises the lowest window that is obscured by other windows.
  216. X.IP "\fBf.cutfile\fP" 20
  217. XThis function takes the contents of the window server's cut buffer 
  218. Xand uses it as a filename to read into the server's cut buffer.
  219. X.IP "\fBf.file\fP \fIstring\fP" 20
  220. XThis function assumes \fIstring\fP is a file name.  This file is read into
  221. Xthe window server's cut buffer.
  222. X.IP "\fBf.focus\fP" 20
  223. XThis function assigns input focus to the root window.
  224. X.IP "\fBf.menu\fP \fIstring\fP" 20
  225. XThis function assigns the pull-down menu named \fIstring\fP to a pointer
  226. Xbutton.  If this function is used as an entry in a pull-down menu a 
  227. Xpull-right menu will be assigned to the menu entry.
  228. X.IP "\fBf.nop\fP" 20
  229. XThis function does nothing.
  230. X.IP "\fBf.quit\fP" 20
  231. XThis function causes \fItwm\fP to exit.
  232. X.IP "\fBf.refresh\fP" 20
  233. XThis function causes all windows to be refreshed.
  234. X.IP "\fBf.source\fP \fIstring\fP" 20
  235. XThis funtion assumes \fIstring\fP is a file name.  The file is read 
  236. Xand parsed as a \fItwm\fP startup file.
  237. XThis
  238. Xfunction is intended to be used only to re-build pull-down menus.  None
  239. Xof the \fItwm\fP variables are changed.
  240. X.IP "\fBf.title\fP \fIstring\fP" 20
  241. XThis function is to be used as an entry in a pull-down menu.  It centers
  242. X\fIstring\fP in a menu entry and outlines it with a border.  This function
  243. Xmay be used more than once in a pull-down menu.
  244. X.IP "\fBf.twmrc\fP" 20
  245. XThis function causes the \fI$HOME/.twmrc\fP file to be re-read.  This
  246. Xfunction is exactly like the \fBf.source\fP function without having to
  247. Xspecify the filename.
  248. X.IP "\fBf.version\fI" 20
  249. XThis function causes the \fItwm\fP version window to be displayed.  This
  250. Xwindow will be displayed until a pointer button is pressed or the
  251. Xpointer is moved from one window to another.
  252. X.PP
  253. X.SH MENUS SECTION
  254. X.PP
  255. XThe menus section is where pull-down menus are defined.  Entries in 
  256. Xmenus consist of Root functions as described in the Buttons Section.
  257. XThe syntax to define a menu is:
  258. X.EX 0
  259. X\fBMenu\fP "\fImenu name\fP"
  260. X{
  261. X   \fIstring\fP    \fIfunction\fP
  262. X   \fIstring\fP    \fIfunction\fP
  263. X     .
  264. X     .
  265. X   \fIstring\fP    \fIfunction\fP
  266. X}
  267. X.EE
  268. X.PP
  269. XThe \fImenu name\fP should be an identical string to one being
  270. Xused with an \fBf.menu\fP Root function.  
  271. XNote that the \fImenu name\fP is case sensative. The \fIstring\fP portion
  272. Xof each menu entry will be the text which will appear in the menu.
  273. XThe \fIfunction\fP portion of the menu entry is one of the Root functions
  274. Xdescribed in the previous section.
  275. X.PP
  276. X.SH SPECIAL FEATURES
  277. X.PP
  278. XSince the X11 xterm does not provide an icon, \fItwm\fP can provide
  279. Xa reasonable looking one for you.  When \fItwm\fP is framing a 
  280. Xwindow it looks at the name of the window to determine if it should
  281. Xadd an appropriate icon for xterm windows.  The names it looks for are:
  282. X.EX 0
  283. Xxterm
  284. Xyterm
  285. Xconsole
  286. Xlogin
  287. X.EE
  288. XIf \fItwm\fP finds any of the above names as the first part of the window
  289. Xname, the \fItwm\fP xterm icon bitmap is assigned as the bitmap
  290. Xto display when the window is iconified.  
  291. X.PP
  292. XIf the window name begins with the string "xterm_", only the portion of the
  293. Xname following the "xterm_" will be displayed as the window name in the
  294. Xtitle bar.  For example:  an xterm started with "-T xterm_iguana" would
  295. Xdisplay the name "iguana" in the title bar.
  296. X.PP
  297. X.SH EXAMPLES
  298. X.PP
  299. XThe following is an example \fItwm\fP startup file:
  300. X.EX 0
  301. X
  302. X#**********************************************************************
  303. X#
  304. X#    .twmrc
  305. X#
  306. X#**********************************************************************
  307. X
  308. XWarpCursor
  309. XUnknownIcon    "/usr/ias_soft/tlastrange/.icon"
  310. XBorderWidth    2
  311. XTitleFont    "8x13"
  312. XMenuFont    "8x13"
  313. XIconFont    "8x13"
  314. X
  315. XButton1        f.menu "button1"
  316. XButton2        f.menu "button2"
  317. XButton3        f.menu "button3"
  318. XButton4        f.nop
  319. XButton5        f.nop
  320. X
  321. XTitleButton1    t.raise
  322. XTitleButton2    t.move
  323. XTitleButton3    t.lower
  324. XTitleButton4    t.nop
  325. XTitleButton5    t.nop
  326. X
  327. XAutoRaise
  328. X{
  329. X  "xterm"    # all of my xterm windows will auto-raise
  330. X}
  331. X
  332. XNoTitle
  333. X{
  334. X  "xclock"    # don't need a title bar on this ...
  335. X  "xckmail"    # or this
  336. X}
  337. X
  338. Xmenu "button1"
  339. X{
  340. X"Sun Systems"    f.title
  341. X"iguana"     !"xterm -T xterm_iguana =80x24+100+100 -e rlogin iguana &"
  342. X"worm"        !"xterm -T xterm_worm =80x24+100+100 &"
  343. X"shiva"        !"xterm -T xterm_shiva =80x24+200+200 -e rlogin shiva &"
  344. X"tegus"        !"xterm -T xterm_tegus =80x24+200+200 -e rlogin tegus &"
  345. X"Vax Systems"    f.title
  346. X"shade"        !"xterm -T xterm_shade =80x24+200+200 -e rlogin shade &"
  347. X"bilbo"        !"xterm -T xterm_bilbo =80x24+250+250 -e rlogin bilbo &"
  348. X"frodo"        !"xterm -T xterm_frodo =80x24+300+300 -e rlogin frodo &"
  349. X"esunix"     !"xterm -T xterm_esunix =80x24+350+350 -e rlogin esunix &"
  350. X"lynx8"        !"xterm -T xterm_lynx8 =80x24+390+390 -e rlogin lynx8 &"
  351. X}
  352. X
  353. Xmenu "button2"
  354. X{
  355. X"Window Ops"        f.title
  356. X"Refresh"        f.refresh
  357. X"Focus on Root"        f.focus
  358. X"Source .twmrc"        f.twmrc
  359. X"Source something"    f.source "something"
  360. X"twm Version"        f.version
  361. X}
  362. X
  363. Xmenu "button3"
  364. X{
  365. X"Cut Buffer"        f.title
  366. X"Procedure Header"    f.file "/usr/ias_soft/tlastrange/src/proc.twm"
  367. X"File Header"        f.file "/usr/ias_soft/tlastrange/src/file.twm"
  368. X"pull right"        f.menu "blob"
  369. X}
  370. X
  371. Xmenu "blob"
  372. X{
  373. X"pull right"        f.menu "final"
  374. X"another"        ^"some text"
  375. X}
  376. X
  377. Xmenu "final"
  378. X{
  379. X"entry 1"        f.nop
  380. X"entry 2"        f.nop
  381. X"entry 3"        f.nop
  382. X"entry 4"        f.nop
  383. X}
  384. X.EE
  385. X.PP
  386. X.SH BUGS
  387. X.PP
  388. X\fITwm\fP needs to deal with color displays at some point.  Only 
  389. Xmonochrome is currently supported.
  390. X.PP
  391. XPull-right menus may still have some problems.  They may sometimes
  392. Xstay around when all pointer buttons have been released.
  393. X.PP
  394. XDouble clicking very fast to get the constrained move function will sometimes
  395. Xcause the window to move, even though the pointer is not moved.
  396. X.PP
  397. X.SH FILES
  398. X.PP
  399. X $HOME/.twmrc
  400. X.PP 
  401. X.SH SEE ALSO
  402. X.PP
  403. XX(1), Xserver(1)
  404. X
  405. X.SH COPYRIGHT
  406. X.ce 4
  407. XCOPYRIGHT 1988
  408. XEvans & Sutherland Computer Corporation
  409. XSalt Lake City, Utah
  410. XAll Rights Reserved.
  411. X.LP
  412. XTHE INFORMATION IN THIS SOFTWARE IS SUBJECT TO CHANGE WITHOUT NOTICE AND
  413. XSHOULD NOT BE CONSTRUED AS A COMMITMENT BY EVANS & SUTHERLAND.
  414. XEVANS & SUTHERLAND  MAKES NO REPRESENTATIONS ABOUT THE SUITABILITY
  415. XOF THIS SOFTWARE FOR
  416. XANY PURPOSE.  IT IS SUPPLIED "AS IS" WITHOUT EXPRESS OR IMPLIED WARRANTY.
  417. X.LP
  418. XIF THE SOFTWARE IS MODIFIED IN A MANNER CREATING DERIVATIVE COPYRIGHT RIGHTS,
  419. XAPPROPRIATE LEGENDS MAY BE PLACED ON THE DERIVATIVE WORK IN ADDITION TO THAT
  420. XSET FORTH ABOVE.
  421. X.LP
  422. XPermission to use, copy, modify, and distribute this software and its
  423. Xdocumentation for any purpose and without fee is hereby granted, provided
  424. Xthat the above copyright notice appear in all copies and that both the
  425. Xcopyright notice and this permission notice appear in supporting documentation,
  426. Xand that the name of Evans & Sutherland not be used in advertising
  427. Xor publicity pertaining to distribution of the software without specific, 
  428. Xwritten prior permission.
  429. X.SH AUTHOR
  430. XThomas E. LaStrange,
  431. XEvans & Sutherland, Interactive Systems Division, Salt Lake City, Utah.
  432. END_OF_FILE
  433. if test 14305 -ne `wc -c <'twm.man'`; then
  434.     echo shar: \"'twm.man'\" unpacked with wrong size!
  435. fi
  436. # end of 'twm.man'
  437. fi
  438. echo shar: End of shell archive.
  439. exit 0
  440.